package uk.co.accolade.clash.core;

//import org.junit.internal.matchers.TypeSafeMatcher;
import org.junit.matchers.TypeSafeMatcher;
import org.hamcrest.Description;

public class UserChangesHasFilePath extends TypeSafeMatcher<UserChanges> {

    private ClashFilePath expectedFilePath;

    public static UserChangesHasFilePath hasFilePath( ClashFilePath expectedFilePath ) {
        return new UserChangesHasFilePath( expectedFilePath );
    }

    public UserChangesHasFilePath( ClashFilePath expectedFilePath ) {
        this.expectedFilePath = expectedFilePath;
    }

    public boolean matchesSafely( UserChanges userChanges ) {
        return userChanges.contains( expectedFilePath );
    }

    public void describeTo( Description description ) {
        description.appendText( "UserChanges did not have expectedFilePath [" + expectedFilePath + "]" );
    }
}